#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "links/linkfactory.h"
#include "proxies/proxyfactory.h"

#include "proxies/proxyadder.h"
#include <QVBoxLayout>
#include <QTcpSocket>

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    QVBoxLayout* layout;
    QVBoxLayout* layoutP;
    LinkFactory* lFactory;
    ProxyFactory* pFactory;
    ProxyAdder proxyAdder;
public:
    explicit MainWindow(LinkFactory*,ProxyFactory*, QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
public slots:
    void newLink(int);
    void newProxy(int);
    void connErr(QAbstractSocket::SocketError);
signals:
    void connectEd(QString);

private slots:
    void on_connectButton_clicked();
};

#endif // MAINWINDOW_H
